package com.hina.rec.endpoint.req.system;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 用户更新请求
 *
 * @author liaosp
 * @date 2024-01-10
 */
@Data
@Schema(description = "用户更新请求")
public class UserUpdateReq {

    /**
     * 用户ID
     */
    @Schema(description = "用户ID", required = true)
    @NotNull(message = "用户ID不能为空")
    private Integer id;

    /**
     * 真实姓名
     */
    @Schema(description = "真实姓名", required = true)
    @NotBlank(message = "真实姓名不能为空")
    @Size(max = 50, message = "真实姓名长度不能超过50个字符")
    private String realName;

    /**
     * 电子邮箱
     */
    @Schema(description = "电子邮箱")
    @Email(message = "邮箱格式不正确")
    private String email;

    /**
     * 联系电话
     */
    @Schema(description = "联系电话")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String phone;

    /**
     * 头像URL或路径
     */
    @Schema(description = "头像URL或路径")
    private String avatar;

    /**
     * 状态（true-启用，false-禁用）
     */
    @Schema(description = "状态（true-启用，false-禁用）")
    private Boolean status;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}